public class Course {
    private String courseId, name;
    private double credit;

    public Course(String courseId, String name, double credit) {
        this.courseId = courseId;
        this.name = name;
        this.credit = credit;
    }

    public String getCourseId() { return courseId; }
    public String getName() { return name; }
    public double getCredit() { return credit; }

    @Override
    public String toString() {
        return "课程编号: " + courseId + ", 课程名称: " + name + ", 学分: " + credit;
    }
}